/* eslint-disable no-script-url */

import React from 'react';
import { Button, Input, Radio } from 'zent';
import { DesignEditor, ControlGroup } from 'zent/lib/design/editor/DesignEditor';
import { DEFAULT_BACKGROUND } from 'zent/lib/design/preview/constants';
import { COLOR_TYPE } from './constants';
import TextArea from 'antd/lib/input/TextArea';
import router from 'umi/router';

const RadioGroup = Radio.Group;
export default class BaseInfoEditor extends DesignEditor {
  static designType = 'productDetail';
  static designDescription = '';

  goProductList = () => {
    window.open(`/#/${window.storeId}/goods/list/onsale`);
  }

  render() {
    const { value, settings, prefix, showError, validation } = this.props;
    return (
      <div>
        <div className={`xkd-moduleTitle`} style={{ fontSize: '14px' }}>
          商品详情
        </div>
        <div className={`${prefix}-design-component-config-editor`}>
          <div>请在商品页中进行编辑，<a onClick={this.goProductList}>点此查看</a></div>          
        </div>
      </div>
    );
  }

  static getInitialValue() {
    return {
      // 模板名称
      name: '',
      specificationsType: 1,
      detailType:1
    };
  }
}
